package com.xiaohudie.thread;

/**
 * @Author xiao hu die
 * @Date 2022/2/21 13:14
 * @Version 1.0
 */
public class AccountThread extends Thread{
    private Account account;
    public AccountThread(Account account) {
    this.account =account;
    }
    public void run(){
        double money =1000;
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        account.drawMoney(money);

    }
}
